package com.teamwork.ZuccEcho.Repository;

import com.teamwork.ZuccEcho.Entity.Teacher;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface LoginTeaApiRepository extends JpaRepository<Teacher,Long> {
    @Query(value = "select tch_pwd from teacher where tch_id = ?1", nativeQuery = true)
    String searchPwdByTeaId(String teacherID);


    List<Teacher> findAll();

    @Query(value = "select * from teacher where tch_id = ?1", nativeQuery = true)
    Teacher findTeacherById(String id);
}
